const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
    lintOnSave: false,
    transpileDependencies: true,
    devServer: {
        proxy: {
            //配置跨域
            '/api': {
                //项目后台接口地址
                target: 'http://k8s-dev.winnermedical.com/winplus-mini-back-end/',
                //设置允许跨域z
                changOrigin: true,
                pathRewrite: {
                    '^/api': ''
                }
            }
        }
    },
    configureWebpack: config => {
        const StyleLintPlugin = require('stylelint-webpack-plugin')
        config.plugins.push(
            new StyleLintPlugin({
                files: ['src/**/*.{vue,html,css,scss,sass,less}'],
                failOnError: false,
                cache: true,
                fix: true
            })
        )
    }
})